<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.19"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Modbus cpp: ::utils</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Modbus cpp
   &#160;<span id="projectnumber">0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.19 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#enumval-members">Enumerator</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">::utils</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceMB_1_1utils"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceMB_1_1utils.html">MB::utils</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gaa34c557c9bf4c6bfeb86aa16b398de55"><td class="memItemLeft" align="right" valign="top"><a id="gaa34c557c9bf4c6bfeb86aa16b398de55"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>MBErrorCode</b> : uint8_t { <br />
&#160;&#160;<b>IllegalFunction</b> = 0x01, 
<b>IllegalDataAddress</b> = 0x02, 
<b>IllegalDataValue</b> = 0x03, 
<b>SlaveDeviceFailure</b> = 0x04, 
<br />
&#160;&#160;<b>Acknowledge</b> = 0x05, 
<b>SlaveDeviceBusy</b> = 0x06, 
<b>NegativeAcknowledge</b> = 0x07, 
<b>MemoryParityError</b> = 0x08, 
<br />
&#160;&#160;<b>GatewayPathUnavailable</b> = 0x10, 
<b>GatewayTargetDeviceFailedToRespond</b> = 0x11, 
<b>ErrorCodeCRCError</b> = 0b0111111, 
<b>InvalidCRC</b> = 0b01111110, 
<br />
&#160;&#160;<b>InvalidByteOrder</b> = 0b01111101, 
<b>InvalidMessageID</b> = 0b01111100, 
<b>ProtocolError</b> = 0b01111011, 
<b>ConnectionClosed</b> = 0b01111010, 
<br />
&#160;&#160;<b>Timeout</b> = 0b01111001
<br />
 }</td></tr>
<tr class="separator:gaa34c557c9bf4c6bfeb86aa16b398de55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8ebb89b73bf4d0e3485b6341a50f116"><td class="memItemLeft" align="right" valign="top"><a id="gaa8ebb89b73bf4d0e3485b6341a50f116"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>MBFunctionCode</b> : uint8_t { <br />
&#160;&#160;<b>ReadDiscreteOutputCoils</b> = 0x01, 
<b>ReadDiscreteInputContacts</b> = 0x02, 
<b>ReadAnalogOutputHoldingRegisters</b> = 0x03, 
<b>ReadAnalogInputRegisters</b> = 0x04, 
<br />
&#160;&#160;<b>WriteSingleDiscreteOutputCoil</b> = 0x05, 
<b>WriteSingleAnalogOutputRegister</b> = 0x06, 
<b>WriteMultipleDiscreteOutputCoils</b> = 0x0F, 
<b>WriteMultipleAnalogOutputHoldingRegisters</b> = 0x10, 
<br />
&#160;&#160;<b>Undefined</b> = 0x00
<br />
 }</td></tr>
<tr class="separator:gaa8ebb89b73bf4d0e3485b6341a50f116"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0b3590994f5ba26cd61929f5a394ab70"><td class="memItemLeft" align="right" valign="top"><a id="ga0b3590994f5ba26cd61929f5a394ab70"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>MBFunctionType</b> { <b>Read</b>, 
<b>WriteSingle</b>, 
<b>WriteMultiple</b>
 }</td></tr>
<tr class="separator:ga0b3590994f5ba26cd61929f5a394ab70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8098c5bcb6c33b219bafdee42334e260"><td class="memItemLeft" align="right" valign="top"><a id="ga8098c5bcb6c33b219bafdee42334e260"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>MBFunctionRegisters</b> { <b>OutputCoils</b>, 
<b>InputContacts</b>, 
<b>HoldingRegisters</b>, 
<b>InputRegisters</b>
 }</td></tr>
<tr class="separator:ga8098c5bcb6c33b219bafdee42334e260"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7aa22230ea192f06612fbc809fca2335"><td class="memItemLeft" align="right" valign="top"><a id="ga7aa22230ea192f06612fbc809fca2335"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__MB.html#ga7aa22230ea192f06612fbc809fca2335">MB::utils::isStandardErrorCode</a> (MBErrorCode code)</td></tr>
<tr class="memdesc:ga7aa22230ea192f06612fbc809fca2335"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if error code is modbus standard error code. <br /></td></tr>
<tr class="separator:ga7aa22230ea192f06612fbc809fca2335"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf467d314367c209ef830b2ae97393b6f"><td class="memItemLeft" align="right" valign="top"><a id="gaf467d314367c209ef830b2ae97393b6f"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>MB::utils::mbErrorCodeToStr</b> (MBErrorCode code) noexcept</td></tr>
<tr class="separator:gaf467d314367c209ef830b2ae97393b6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab24a81a029cf6c4765eab5d74b7d8dff"><td class="memItemLeft" align="right" valign="top"><a id="gab24a81a029cf6c4765eab5d74b7d8dff"></a>
MBFunctionType&#160;</td><td class="memItemRight" valign="bottom"><b>MB::utils::functionType</b> (const MBFunctionCode code)</td></tr>
<tr class="separator:gab24a81a029cf6c4765eab5d74b7d8dff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad967d0ef18fecbc1a231143db3793991"><td class="memItemLeft" align="right" valign="top"><a id="gad967d0ef18fecbc1a231143db3793991"></a>
MBFunctionRegisters&#160;</td><td class="memItemRight" valign="bottom"><b>MB::utils::functionRegister</b> (const MBFunctionCode code)</td></tr>
<tr class="separator:gad967d0ef18fecbc1a231143db3793991"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaf546a5a9bb27ee4f7300064d18d9a9e"><td class="memItemLeft" align="right" valign="top"><a id="gaaf546a5a9bb27ee4f7300064d18d9a9e"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>MB::utils::mbFunctionToStr</b> (MBFunctionCode code) noexcept</td></tr>
<tr class="separator:gaaf546a5a9bb27ee4f7300064d18d9a9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2057e90dfbefb2bc7cea23f6140d5a04"><td class="memItemLeft" align="right" valign="top"><a id="ga2057e90dfbefb2bc7cea23f6140d5a04"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>MB::utils::bigEndianConv</b> (const uint8_t *buf)</td></tr>
<tr class="separator:ga2057e90dfbefb2bc7cea23f6140d5a04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa419ed339bbdacd4108fb5cc1cd14539"><td class="memItemLeft" align="right" valign="top"><a id="gaa419ed339bbdacd4108fb5cc1cd14539"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>MB::utils::calculateCRC</b> (const uint8_t *buff, size_t len)</td></tr>
<tr class="separator:gaa419ed339bbdacd4108fb5cc1cd14539"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga102e7bc4008a2658a5db76a9b70bec97"><td class="memItemLeft" align="right" valign="top"><a id="ga102e7bc4008a2658a5db76a9b70bec97"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>MB::utils::calculateCRC</b> (const std::vector&lt; uint8_t &gt; &amp;buffer)</td></tr>
<tr class="separator:ga102e7bc4008a2658a5db76a9b70bec97"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.19
</small></address>
</body>
</html>
